package com.actionpals.events
{
	import flash.events.Event;

	public class CalendarEvent extends Event
	{
		public static const DATE_SELECT:String = "dateSelect";
		public static const PREVIOUS_MONTH_SELECT:String = "previousMonthSelect";
		public static const NEXT_MONTH_SELECT:String = "nextMonthSelect";
		
		protected var _date:Date;
		protected var _events:Array;
		
		public function CalendarEvent( type:String, date:Date, bubbles:Boolean=false, cancelable:Boolean=false, events:Array=null )
		{
			super( type, bubbles, cancelable );
			this.date = date;
			this.events = events;
		}
		
		public function get date():Date
		{
			return _date;
		}
		
		public function set date( value:Date ):void
		{
			_date = value;
		}
		
		public function get events():Array
		{
			return _events;
		}
		
		public function set events( value:Array ):void
		{
			_events = value;
		}
		
		public override function clone():Event
		{
			return new CalendarEvent( type, date, bubbles, cancelable, events );
		}
		
		public override function toString():String
		{
			return formatToString( "CalendarEvent", "type", "bubbles", "cancelable", "eventPhase" );
		}
		
	}
}